﻿namespace GalaxyEngine.Ui
{
    using System.Collections.Generic;

    public sealed class UserControl : IHtmlObject
    {
        public List<IWidget> Widgets { get; set; }

        public UserControl()
        {
            Widgets = new List<IWidget>();
        }

        public string RenderHtml()
        {
            string html = string.Empty;
            foreach (IWidget widget in Widgets)
            {
                html += widget.ToHtml();
            }

            return html;
        }
    }
}
